import api from '@/api/index.js'
import {refreshTokenPost} from '@/api/refreshToken.js'

const url = '/setting/printcode/'

// 打印单据列表查询
// 查询列表
export function PrintOrderListGet(params) {
  refreshTokenPost(api)
  return api({
    url: url + 'printorderlist/',
    method: 'get',
    params: params,
  })
}

// 打印模板操作===========================================
// 查询列表
export function PrintTemplateListGet(params) {
  refreshTokenPost(api)
  return api({
    url: url + 'printtemplatelist/',
    method: 'get',
    params: params,
  })
}

// 新增
export function PrintTemplateListPost(data) {
  return api({
    url: url + 'printtemplatelist/',
    method: 'post',
    data: data,
  })
}


// 查询单个
export function PrintTemplatePkGet(pk) {
  return api({
    url: url + 'printtemplatepk/' + pk + '/',
    method: 'get',
  })
}
// 修改
export function PrintTemplatePkPut(data,pk) {
  return api({
    url: url + 'printtemplatepk/' + pk + '/',
    method: 'put',
    data: data,
  })
}

// 删除
export function PrintTemplatePkDelete(pk) {
  return api({
    url: url + 'printtemplatepk/' + pk + '/',
    method: 'delete',
  })
}